package edu.spbsu.nonsm00th.qdiff.parser.exception;

import java.text.MessageFormat;

/**
 * Throws if there is a wrong expression or subexpression.
 *
 * @author mbuzdov
 */
public class WrongExpressionException extends ParserException {

    public WrongExpressionException(int position) {//+- - wrong sentense: -x is xorrect expression?
        super(MessageFormat.format("After any open bracket, separator and operation should go correct expression. " +
                "Expression and subexpression can't start like this, position: {0}.", position));
        this.position = position;
    }

}
